<?php

Auth::routes();


Route::group(['middleware' => ['web']], function () {
    Route::auth();
    Route::get('/logout', 'Auth\LoginController@logout');

    Route::any('/', 'HomeController@index');
    Route::get('/home', 'HomeController@index')->name('home');
    Route::get('log','HomeController@log');
    Route::get('door','HomeController@door');
    Route::any('user', 'HomeController@user');
    Route::any('rules', 'HomeController@rules');
    Route::any('url', 'HomeController@url');
    Route::get('order','HomeController@order');
    Route::get('goods','HomeController@goods');
    Route::get('brand','HomeController@brand');
    Route::get('mycompany','HomeController@mycompany');
    Route::get('color','HomeController@color');
    Route::get('size','HomeController@size');
    Route::get('client','HomeController@client');
    Route::get('supplier','HomeController@supplier');
    Route::get('shop','HomeController@shop');
    Route::get('group','HomeController@group');
    Route::get('fund','HomeController@fund');
    Route::post('img/post','HomeController@imgPost');
    Route::any('excel','HomeController@excel');

//    Route::get('phpinfo',function ()
//    {
//     phpinfo();
//    }
//    );


});

Route::group(['middleware' => 'web'], function () {
    Route::auth();
    Route::post('company/register', 'CompanyController@register');
    Route::any('company/getAll', 'CompanyController@getAll');
    Route::any('company/checkName/{company}', 'CompanyController@checkName');
    Route::any('company/getCount', 'CompanyController@getCount');
    Route::any('company/getCurrent/{page}', 'CompanyController@getCurrent');
    Route::any('company/add', 'CompanyController@add');
    Route::any('company/del/{id}', 'CompanyController@del');
    Route::any('company/one/{id}', 'CompanyController@one');
    Route::any('company/myCompany/{id}', 'CompanyController@myCompany');
    Route::any('company/update/{id}', 'CompanyController@update');
    Route::any('company/search/{word}', 'CompanyController@search');
    Route::any('company/page/{page}', 'CompanyController@page');
    Route::any('company/dateOne/{date}', 'CompanyController@dateOne');
    Route::any('company/datemor/{date}', 'CompanyController@datemor');

});

Route::group(['middleware' => 'web'], function () {
    Route::auth();

    Route::any('brand/getAll/{company}', 'BrandController@getAll');
    Route::any('brand/getCount/{company}', 'BrandController@getCount');
    Route::any('brand/getCurrent/{page}/{company}', 'BrandController@getCurrent');
    Route::any('brand/add', 'BrandController@add');
    Route::any('brand/del', 'BrandController@del');
    Route::any('brand/one/{id}', 'BrandController@one');
    Route::any('brand/update/{id}', 'BrandController@update');
    Route::any('brand/search/{word}', 'BrandController@search');
    Route::any('brand/page/{page}', 'BrandController@page');
    Route::any('brand/dateOne/{date}', 'BrandController@dateOne');
    Route::any('brand/datemor/{date}', 'BrandController@datemor');

});

Route::group(['middleware' => 'web'], function () {
    Route::auth();

    Route::any('group/getAll/{company}', 'GroupController@getAll');
    Route::any('group/getCount/{company}', 'GroupController@getCount');
    Route::any('group/getCurrent/{page}/{company}', 'GroupController@getCurrent');
    Route::any('group/add', 'GroupController@add');
    Route::any('group/del', 'GroupController@del');
    Route::any('group/one/{id}', 'GroupController@one');
    Route::any('group/update/{id}', 'GroupController@update');
    Route::any('group/search/{word}', 'GroupController@search');
    Route::any('group/page/{page}', 'GroupController@page');
    Route::any('group/dateOne/{date}', 'GroupController@dateOne');
    Route::any('group/datemor/{date}', 'GroupController@datemor');

});

Route::group(['middleware' => 'web'], function () {
    Route::auth();

    Route::any('goods/getAll/{company}', 'GoodsController@getAll');
    Route::any('goods/getCount/{company}', 'GoodsController@getCount');
    Route::any('goods/getCurrent/{page}/{company}', 'GoodsController@getCurrent');
    Route::any('goods/add', 'GoodsController@add');
    Route::any('goods/del', 'GoodsController@del');
    Route::any('goods/inputPost', 'GoodsController@inputPost');
    Route::any('goods/one/{id}', 'GoodsController@one');
    Route::any('goods/getSizes/{id}', 'GoodsController@getSizes');
    Route::any('goods/getColors/{id}', 'GoodsController@getColors');
    Route::any('goods/getPics/{id}', 'GoodsController@getPics');
    Route::any('goods/update/{id}', 'GoodsController@update');
    Route::any('goods/search/{word}', 'GoodsController@search');
    Route::any('goods/page/{page}', 'GoodsController@page');
    Route::any('goods/dateOne/{date}', 'GoodsController@dateOne');
    Route::any('goods/datemor/{date}', 'GoodsController@datemor');


    Route::any('orderGoods/getAll/{company}', 'OgoodsController@getAll');
    Route::any('orderGoods/getCount/{company}', 'OgoodsController@getCount');
    Route::any('orderGoods/getCurrent/{page}/{company}', 'OgoodsController@getCurrent');

});

Route::group(['middleware' => 'web'], function () {
    Route::auth();

    Route::any('client/getAll/{company}', 'ClientController@getAll');
    Route::any('client/getCount/{company}', 'ClientController@getCount');
    Route::any('client/getCurrent/{page}/{company}', 'ClientController@getCurrent');
    Route::any('client/add', 'ClientController@add');
    Route::any('client/del', 'ClientController@del');
    Route::any('client/one/{id}', 'ClientController@one');
    Route::any('client/update/{id}', 'ClientController@update');
    Route::any('client/search/{word}', 'ClientController@search');
    Route::any('client/page/{page}', 'ClientController@page');
    Route::any('client/dateOne/{date}', 'ClientController@dateOne');
    Route::any('client/datemor/{date}', 'ClientController@datemor');

});
Route::group(['middleware' => 'web'], function () {
    Route::auth();

    Route::any('supplier/getAll', 'SupplierController@getAll');
    Route::any('supplier/getCount/{company}', 'SupplierController@getCount');
    Route::any('supplier/getCurrent/{page}/{company}', 'SupplierController@getCurrent');
    Route::any('supplier/add', 'SupplierController@add');
    Route::any('supplier/del', 'SupplierController@del');
    Route::any('supplier/one/{id}', 'SupplierController@one');
    Route::any('supplier/update/{id}', 'SupplierController@update');
    Route::any('supplier/search/{word}', 'SupplierController@search');
    Route::any('supplier/page/{page}', 'SupplierController@page');
    Route::any('supplier/dateOne/{date}', 'SupplierController@dateOne');
    Route::any('supplier/datemor/{date}', 'SupplierController@datemor');

});
Route::group(['middleware' => 'web'], function () {
    Route::auth();

    Route::any('size/getAll/{company}', 'SizeController@getAll');
    Route::any('size/getCount/{company}', 'SizeController@getCount');
    Route::any('size/getCurrent/{page}/{company}', 'SizeController@getCurrent');
    Route::any('size/add', 'SizeController@add');
    Route::any('size/del', 'SizeController@del');
    Route::any('size/one/{id}', 'SizeController@one');
    Route::any('size/update/{id}', 'SizeController@update');
    Route::any('size/search/{word}', 'SizeController@search');
    Route::any('size/page/{page}', 'SizeController@page');
    Route::any('size/dateOne/{date}', 'SizeController@dateOne');
    Route::any('size/datemor/{date}', 'SizeController@datemor');

});

Route::group(['middleware' => 'web'], function () {
    Route::auth();

    Route::any('color/getAll/{company}', 'ColorController@getAll');
    Route::any('color/getCount/{company}', 'ColorController@getCount');
    Route::any('color/getCurrent/{page}/{company}', 'ColorController@getCurrent');
    Route::any('color/add', 'ColorController@add');
    Route::any('color/del', 'ColorController@del');
    Route::any('color/one/{id}', 'ColorController@one');
    Route::any('color/update/{id}', 'ColorController@update');
    Route::any('color/search/{word}', 'ColorController@search');
    Route::any('color/page/{page}', 'ColorController@page');
    Route::any('color/dateOne/{date}', 'ColorController@dateOne');
    Route::any('color/datemor/{date}', 'ColorController@datemor');

});

Route::group(['middleware' => 'web'], function () {
    Route::auth();

    Route::any('user/getAll/{company}', 'UserController@getAll');
    Route::any('user/getCount/{company}', 'UserController@getCount');
    Route::any('user/getCurrent/{page}/{company}', 'UserController@getCurrent');
    Route::any('user/add', 'UserController@add');
    Route::any('user/del', 'UserController@del');
    Route::any('user/one/{id}', 'UserController@one');
    Route::any('user/update/{id}', 'UserController@update');
    Route::any('user/search/{word}', 'UserController@search');
    Route::any('user/page/{page}', 'UserController@page');
    Route::any('user/dateOne/{date}', 'UserController@dateOne');
    Route::any('user/datemor/{date}', 'UserController@datemor');

});

Route::group(['middleware' => 'web'], function () {
    Route::auth();

    Route::any('rules/getAll', 'RulesController@getAll');
    Route::any('rules/getCount', 'RulesController@getCount');
    Route::any('rules/getCurrent/{page}', 'RulesController@getCurrent');
    Route::any('rules/add/{userId}', 'RulesController@add');
    Route::any('rules/del/{id}', 'RulesController@del');
    Route::any('rules/one/{id}', 'RulesController@one');
    Route::any('rules/update/{id}', 'RulesController@update');
    Route::any('rules/search/{word}', 'RulesController@search');
    Route::any('rules/page/{page}', 'RulesController@page');
    Route::any('rules/dateOne/{date}', 'RulesController@dateOne');
    Route::any('rules/datemor/{date}', 'RulesController@datemor');

});

Route::group(['middleware' => 'web'], function () {
    Route::auth();

    Route::any('url/getAll', 'UrlController@getAll');
    Route::any('url/getCompanyAll/{company}', 'UrlController@getCompanyAll');
    Route::any('url/getChildren/{id}', 'UrlController@getChildren');
    Route::any('url/add', 'UrlController@add');
    Route::any('url/del/{id}', 'UrlController@del');
    Route::any('url/one/{id}', 'UrlController@one');
    Route::any('url/update/{id}', 'UrlController@update');

});





Route::group(['middleware' => 'web'], function () {
    Route::auth();

    Route::any('order/getAll/{company}', 'OrderController@getAll');
    Route::any('order/getCount/{company}', 'OrderController@getCount');
    Route::any('order/getCurrent/{page}/{company}', 'OrderController@getCurrent');
    Route::any('order/getCountState/{company}/{state}', 'OrderController@getCountState');
    Route::any('order/getCurrentState/{page}/{company}/{state}', 'OrderController@getCurrentState');
    Route::any('order/search/{word}/{type}/{company}', 'OrderController@search');
    Route::any('order/add', 'OrderController@add');
    Route::any('order/addNewGoods', 'OrderController@addNewGoods');
    Route::any('order/del', 'OrderController@del');
    Route::any('order/one/{id}', 'OrderController@one');
    Route::any('order/newConfirm/{id}', 'OrderController@newConfirm');
    Route::any('order/outConfirm/{id}', 'OrderController@outConfirm');
    Route::any('order/haveGoods/{id}', 'OrderController@haveGoods');
    Route::any('order/noGoods/{id}', 'OrderController@noGoods');
    Route::any('order/chinaGetConfirm/{id}', 'OrderController@chinaGetConfirm');
    Route::any('order/chinaOutConfirm/{id}', 'OrderController@chinaOutConfirm');
    Route::any('order/costConfirm/{id}', 'OrderController@costConfirm');
    Route::any('order/payConfirm/{id}', 'OrderController@payConfirm');

    Route::any('order/update/{id}', 'OrderController@update');
    Route::any('order/updateOut/{id}', 'OrderController@updateOut');
    Route::any('order/buyerConfirm/{id}', 'OrderController@buyerConfirm');

    Route::any('order/page/{page}', 'OrderController@page');
    Route::any('order/dateOne/{date}', 'OrderController@dateOne');
    Route::any('order/datemor/{date}', 'OrderController@datemor');



});







Route::group(['middleware' => 'web'], function () {
    Route::auth();

    Route::any('worker/getAll', 'WorkerController@getAll');
    Route::any('worker/getCount', 'WorkerController@getCount');
    Route::any('worker/getCurrent/{page}', 'WorkerController@getCurrent');
    Route::any('worker/add', 'WorkerController@add');
    Route::any('worker/update/{id}', 'WorkerController@update');
    Route::any('worker/del/{id}', 'WorkerController@destroy');
    Route::any('worker/one/{id}', 'WorkerController@one');

    Route::any('worker/search/{word}', 'WorkerController@search');
    Route::any('worker/dateOne/{date}', 'WorkerController@dateOne');
    Route::any('worker/datemor/{date}', 'WorkerController@datemor');

    Route::get('/search/worker/{word}/{type}', 'WorkerController@search');

    Route::any('worker/getOneCode/{code}', 'WorkerController@getOneCode');

});


Route::group(['middleware' => 'web'], function () {
    Route::auth();

    Route::any('log/getAll', 'LogController@getAll');
    Route::any('log/getCount', 'LogController@getCount');
    Route::any('log/getCurrent/{page}', 'LogController@getCurrent');
    Route::any('log/add', 'LogController@add');
    Route::any('log/update/{id}', 'LogController@update');
    Route::any('log/del/{id}', 'LogController@destroy');
    Route::any('log/one/{id}', 'LogController@one');

    Route::any('log/search/{word}', 'LogController@search');
    Route::any('log/dateOne/{date}', 'LogController@dateOne');
    Route::any('log/datemor/{date}', 'LogController@datemor');

});


Route::group(['middleware' => 'web'], function () {
    Route::auth();
 
    Route::get('flow','FlowController@index');
    Route::get('flow/home','FlowController@home');
    Route::any('flow/pass','FlowController@pass');
    Route::get('flow/getTask/{code}','FlowController@getTask');
    Route::get('flow/getTaskWorkshop/{code}','FlowController@getTaskWorkshop');
    Route::get('flow/getNext/{code}','FlowController@getNext');


    Route::get('flow/getTaskOutput/{id}','FlowController@getTaskOutput');
    Route::get('flow/makeSure/{code}','FlowController@makeSure');
    Route::get('flow/notSure/{code}','FlowController@notSure');
    Route::get('flowend','FlowController@end');
    Route::post('flow/workerCode','FlowController@workerCode');
    Route::post('flow/flowFinish','FlowController@flowFinish');
    Route::post('flow/flowendcode','FlowController@flowendcode');
    Route::post('flow/finished','FlowController@finished');
    Route::post('flow/finishc','FlowController@finishc');
    Route::post('flow/canWork','FlowController@canWork');
    Route::post('flow/notWork','FlowController@notWork');

});


   
Route::group(['middleware' => 'web'], function () {
    Route::auth();
    
    

    Route::any('getworks', 'WorkController@getworks');
    Route::any('getWorkeds', 'WorkController@getWorkeds');
    Route::any('worked/getAll', 'WorkController@getAll');
    Route::any('worked/getMonth/{month}', 'WorkController@getMonth');
    Route::any('getAllWorkeds', 'WorkController@getAllWorkeds');
    Route::any('getworkers', 'WorkController@getworkers');
    Route::any('getnewworkers/{date}', 'WorkController@getnewworkers');
    Route::any('work/addWork', 'WorkController@addWork');
    Route::any('work/setworker', 'WorkController@setworker');
    Route::any('work/notAllot', 'WorkController@notAllot');
    Route::any('work/notAllotInfo', 'WorkController@notAllotInfo');
    Route::any('work/workcan', 'WorkController@workcan');
    Route::any('work/worknotcan', 'WorkController@worknotcan');


  

    
    

});

Route::group(['middleware' => 'web'], function () {
    Route::auth();
    
    Route::any('job', 'JobController@index');
    Route::any('job/add', 'JobController@add');
    Route::any('job/getAll', 'JobController@getAll');
    Route::any('job/edit/{id}', 'JobController@edit');
    Route::any('job/del/{id}', 'JobController@del');
    Route::any('job/getOne/{id}', 'JobController@getOne');

    Route::get('info', 'PayrollController@index');
    Route::any('info/showmore', 'PayrollController@showmore');
    Route::any('info/getall', 'PayrollController@getall');
    Route::any('info/cost', 'PayrollController@cost');
    Route::any('info/getCost', 'PayrollController@getCost');
    Route::any('info/setCost', 'PayrollController@setCost');
    

});
Route::group(['middleware' => 'web'], function () {
    Route::any('shop', 'ShopController@index');
    Route::any('shop/add', 'ShopController@add');
    Route::any('shop/userInfo', 'ShopController@userInfo');
    Route::any('shop/getAll', 'ShopController@getAll');
    Route::any('shop/edit/{id}', 'ShopController@edit');
    Route::any('shop/del/{id}', 'ShopController@del');
    Route::any('shop/getOne/{id}', 'ShopController@getOne');


});


    


    



    



